<?php $theme = "front"; ?>
<div class="blog">
    <div class="container">
        <div class="blog-top">
            <div class="col-md-9 blog-left">
                <div class="blog-main">
                    <a href="#" class="bg"><?php echo $info['title'] ?></a>
                    <div class="blog-comments">
                        <ul>
                            <li><span class="glyphicon glyphicon-bookmark" aria-hidden="true"></span>来源：<?php echo $info['article_source'] ?></li>
                            <li><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>浏览次数：<?php echo $info['clickcount'] ?></li>
                            <li><span class="glyphicon glyphicon-user" aria-hidden="true"></span>时间：<?php echo date('Y-m-d', $info['modified']); ?></li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="blog-main-one">
                    <div class="blog-one">
                        <?php if ($info['big_img']): ?>
                            <img src="<?php echo image($info['big_img'], $theme); ?>" />
                        <?php endif; ?>
                        <p><?php echo $info['content'] ?></p>
                    </div>	
                </div>
            </div>

            <div class="col-md-3 blog-right">
                <?php
                $fields = array('id', 'sortname');
                $search['attributes']['parentid'] = 0;
                $classInfo = $this->news_class_model->get_appoint_values($fields, null, $search);
                foreach ($classInfo as $ck => $cv) {
                    echo '<div class="categories">';
                    echo '<h3>' . $cv['sortname'] . '</h3>';
                    echo '<ul>';
                    $search['attributes']['parentid'] = $cv['id'];
                    $childInfo = $this->news_class_model->get_appoint_values($fields, null, $search);
                    foreach ($childInfo as $key => $value) {
                        echo '<li><a href = "' . base_url($this->_site_path . '/news/index/' . $value['id']) . '">' . $value['sortname'] . '</a></li>';
                    }
                    echo '</ul>';
                    echo '</div>';
                }
                ?>
                <div class = "categories">
                    <h3>服务保障</h3>
                    <ul>
                        <?php
                        $fields = array('id', 'title');
                        $search['attributes']['parentid'] = 3;
                        $serviceInfo = $this->news_model->get_appoint_values($fields, null, $search);
                        foreach ($serviceInfo as $s) {
                            echo '<li><a href = "' . base_url($this->_site_path . '/news/single/' . $s['id']) . '">' . $s['title'] . '</a></li>';
                        }
                        ?>
                    </ul>
                </div>
            </div>

            <div class="clearfix"></div>
        </div>
        <div class="pagination">
            <nav>
                <ul class="pager">
                    <?php if ($pre): ?>
                        <li><a href="<?php echo base_url($this->_site_path . '/news/single/' . $pre['id']) ?>">上一条</a></li>
                    <?php endif; ?>
                    <?php if ($next): ?>
                        <li><a href="<?php echo base_url($this->_site_path . '/news/single/' . $next['id']) ?>">下一条</a></li>
                    <?php endif; ?>
                </ul>
            </nav>
        </div>
    </div>
</div>